package ysq.xyg.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ysq.xyg.dao.BaseUserDao;
import ysq.xyg.model.BaseDepart;
import ysq.xyg.model.BaseUser;
import ysq.xyg.service.BaseUserService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author yu sheng qiang
 * @create 2017-03-22 15:37
 **/
@Service("baseUserService")
public class BaseUserServiceImpl extends BaseServiceImpl<BaseUser> implements BaseUserService {
    @Resource
    private BaseUserDao baseUserDao;

    @Autowired
    public void setBaseDao(BaseUserDao baseUserDao) {
        this.baseDao = baseUserDao;
    }

    @Override
    public PageInfo<BaseUser> pageInfo(BaseUser baseUser, int pageSize, int pageNum) {
        PageHelper.startPage(pageNum,pageSize);
        List<BaseUser> list=baseUserDao.select(baseUser);
        return new PageInfo<BaseUser>(list);
    }

}
